<!DOCTYPE html>
<html lang="en">
<head>
    <script type="application/javascript">
        function addQuestion() {
            let question = document.getElementById("question").value;

            fetch("/exam/question/add", {
                method: "post", headers: {
                    'Content-Type': 'application/json'
                },
                body: question
            }).then(function (response) {
                return response.json()
            }).then(function (data) {
                document.getElementById("result").innerHTML = JSON.stringify(data);
            })
        }
    </script>
</head>
<textarea id="question" rows="30" cols="120">

</textarea>
<p>
    <button onclick="addQuestion()">submit</button>
</p>
content: <input type="text" id="content">
score: <input type="text" id="score">
keyword: <input type="text" id="keyword">
<div>
    option: <input type="text" name="option_content"> remark: <input type="text" name="remark">
    <input type="checkbox" name="correct">
</div>
<div>
    option: <input type="text" name="option_content"> remark: <input type="text" name="remark">
    <input type="checkbox" name="correct">
</div>
<div>
    option: <input type="text" name="option_content"> remark: <input type="text" name="remark">
    <input type="checkbox" name="correct">
</div>
<div>
    option: <input type="text" name="option_content"> remark: <input type="text" name="remark">
    <input type="checkbox" name="correct">
</div>

<p id="result"></p>
</html>